package com.awan.utils;

import java.io.File;

public class FileUtils {
	public static boolean fileExists(String filePath) {
		return new File(filePath).exists();
	}
	public static String getFileName(String filePath) {
		String fileName = filePath;
		int lastSlash = filePath.toString().lastIndexOf('/');
        
        if(lastSlash >=0)
        {
            fileName = filePath.toString().substring(lastSlash + 1);
        }
        if(fileName.equals(""))
        {
            fileName = filePath;
        }
        return fileName;
	}
}
